﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Leetcode_Array.Script.BinaryTreeCode
{
    //二叉树
    class TreeNode
    {
        public int val;
        public TreeNode left;
        public TreeNode right;
        public TreeNode next;//指向下一个右侧节点，部分题用
        public TreeNode() { }
        public TreeNode(int val) { this.val = val; }
        public TreeNode(int val, TreeNode left, TreeNode right)
        {
            this.val = val;
            this.left = left;
            this.right = right;
        }

    }

    //N叉树
    class TreeNodeN
    {
        public int val;
        public IList<TreeNodeN> children;
        public TreeNodeN()
        {

        }
        public TreeNodeN( int val)
        {
            this.val = val;
        }
        public TreeNodeN(int val, IList<TreeNodeN> children)
        {
            this.val = val;
            this.children = children;
        }
    }
}
